package cz.muni.fi.pa165.sme.client.pages.sportActivity;

import cz.muni.fi.pa165.sme.client.fo.SportActivityFO;
import cz.muni.fi.pa165.sme.client.pages.TemplatePage;
import cz.muni.fi.pa165.sme.client.panels.sportActivity.ActivityForm;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.ResourceModel;

/**
 * @author jirankova
 */
public class ActivityAddPage extends TemplatePage {

	public ActivityAddPage() {
		add(new Label("title", new ResourceModel("activity.add.title")));
		//form

		final CompoundPropertyModel<SportActivityFO>
				recordModel = new CompoundPropertyModel<SportActivityFO>(new LoadableDetachableModel<SportActivityFO>() {
			@Override
			protected SportActivityFO load() {
				return new SportActivityFO();
			}
		});

		add(new ActivityForm("form", recordModel));
	}
}
